<?php

use Phalcon\Loader;

$loader = new Loader();

/**
 * We're a registering a set of directories taken from the configuration file
 */
$loader->registerNamespaces([
    'app\models'      => $config->application->modelsDir,
    'app\controllers' => $config->application->controllersDir,
    'app\traits'      => $config->application->traitsDir,
    'app\events'      => $config->application->eventsDir,
    'app\plugins'    => $config->application->pluginsDir,
]);
$loader->registerDirs([
    $config->application->commonLib
]);

$loader->register();
